import Vue from 'vue'
import Router from 'vue-router'
Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'Home',
      component: () => import('pages/Home'),
      children: [
        {
          path: 'Product/:id',
          name: 'Product',
          component: () => import('pages/Product')
        }
      ]
    },
    {
      path: '/Cart',
      name: 'Cart',
      component: () => import('pages/Cart')
    },
    {
      path: '/Category',
      name: 'Category',
      component: () => import('pages/Category')
    },
    {
      path: '/Personal',
      name: 'Personal',
      component: () => import('pages/Personal')
    },
    {
      path: '/Search',
      name: 'Search',
      component: () => import('pages/Search')
    },
    {
      path: '*',
      redirect: '/'
    }
  ]
})
